package com.anny.crm.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.anny.crm.model.User;

@Repository
public interface UserDao extends JpaRepository<User, String> {
	/**
	 * 用户登录
	 * @param username
	 * @param password
	 * @return
	 */
	@Query("from User u where u.loginName = ?1 and u.password =?2")
	User findOneUser(String loginName,String password);
}
